<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
	<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"
	media="all">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css"
	media="all" />
<link rel="stylesheet" href="css/ionicons.min.css" type="text/css"
	media="all" />
<link rel="stylesheet" href="css/owl.carousel.css" type="text/css"
	media="all">
<link rel="stylesheet" href="css/owl.theme.css" type="text/css"
	media="all">
<link rel='stylesheet' href='css/prettyPhoto.css' type='text/css'
	media='all'>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<link rel="stylesheet" href="css/custom.css" type="text/css" media="all">
<link
	href="http://fonts.googleapis.com/css?family=Great+Vibes%7CLato:100,100i,300,300i,400,400i,700,700i,900,900i"
	rel="stylesheet">
<title>按种类查看</title>
</head>
<body>
<script type="text/javascript">
function addwish(DishId){
	var c_id=$("#cid").val();
	if(c_id==null||c_id=="")
		{alert("请先登录！！");}
	else{
		var wishdata={
				DishId:DishId,
				c_id:c_id
		};
		$.ajax({
			type:"POST",
			data:wishdata,
			url :'menu/addtowish.do',
			error : function(request) {
				alert("请求异常!!!");
			},
			success : function(data) {
				alert("添加成功!");
				window.location.reload();
			}
		});
	}
}
</script>
<div class="section border-bottom pt-2 pb-2">
			<div class="container">
				<div class="row">
					<div class="col-sm-12">
						<ul class="breadcrumbs">
							<li><a href="menu/recommand.do">首页</a></li>
							<li>分类查询</li>							
						</ul>
					</div>
				</div>
			</div>
		</div>
	<div class="product-grid">
	<c:forEach items="${mklist }" var="mkl">
		<div class="col-md-3 col-sm-4 product-item text-center mb-3">
			<div class="product-thumb">
				<a href="shop-detail.html">
					<div class="badges">
<!-- 						<span class="hot">Hot</span>  -->
<!-- 						<span class="onsale">Sale!</span> -->
					</div>
					 <img src="upimg/${mkl.dishPicture }" alt="加载中" style="width:300px;height:200px" />
				</a>
				<div class="product-action">
					<span class="add-to-cart"> <a href="addCart.do?DishId=${mkl.dishId }" data-toggle="tooltip"
						data-placement="top" title="加入购物车"></a>
					</span> 
					
					<span><input type="button" onclick="addwish(${hl.dishId })" value="收藏" style="width:40px;height:35px"/>
					</span>
					<span class="quickview"> <a href="menu/showmenuinfo.do?DishId=${mkl.dishId }" data-toggle="tooltip"
						data-placement="top" title="查看详情"></a>
					</span> 
				</div>
			</div>
			<input type="hidden" value="${custom.c_id }" id="cid">
			<div class="product-info">
				<a href="shop-detail.html">
					<h2 class="title">${mkl.dishName }</h2> <span class="price">
						<ins>￥：${mkl.dishPrice }</ins>
				</span>
				</a>
			</div>
			
		</div>
			</c:forEach>
	</div>

	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery-migrate.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/modernizr-2.7.1.min.js"></script>
	<script type="text/javascript" src="js/owl.carousel.min.js"></script>
	<script type="text/javascript" src="js/jquery.countdown.min.js"></script>
	<script type='text/javascript' src='js/jquery.prettyPhoto.js'></script>
	<script type='text/javascript' src='js/jquery.prettyPhoto.init.min.js'></script>
	<script type="text/javascript" src="js/script.js"></script>
	<script type="text/javascript" src="js/core.min.js"></script>
	<script type="text/javascript" src="js/widget.min.js"></script>
	<script type="text/javascript" src="js/mouse.min.js"></script>
	<script type="text/javascript" src="js/slider.min.js"></script>
	<script type="text/javascript" src="js/jquery.ui.touch-punch.js"></script>
	<script type="text/javascript" src="js/price-slider.js"></script>
</body>
</html>